package com.changpay.zywy.ui.fragment.main

import com.changpay.zywy.R
import com.changpay.zywy.base.BaseMvpFragment
import com.changpay.zywy.mvp.contract.InfoContract
import com.changpay.zywy.bean.ZhiXunBg
import com.changpay.zywy.mvp.presenter.InfoPresenter
import com.changpay.zywy.utils.ImageLoader
import kotlinx.android.synthetic.main.fragment_info.*

class InfoFragment:BaseMvpFragment<InfoContract.View, InfoContract.Presenter>(), InfoContract.View{
    override fun showZhiXunBg(data: ZhiXunBg) {
        ImageLoader.load(data.adv_code,info_iv_bg)
    }

    companion object {
        fun getInstance(): InfoFragment = InfoFragment()
    }

    override fun createPresenter(): InfoContract.Presenter  = InfoPresenter()

    override fun attachLayoutRes(): Int  = R.layout.fragment_info

    override fun lazyLoad() {
        mPresenter?.getZhiXunInfo()
    }
}